/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Com;
import Entidad.*;
import Dao.*;
import java.util.ArrayList;
import java.util.List;
/**
 *
 * @author ANDREZ
 */
public class HorarioCom {
    
           private static HorarioCom INSTANCE = new HorarioCom();
    private HorarioCom() {
    }
    public static HorarioCom getInstance(){
    return INSTANCE;
    }
    
    public List<CursoBE> ListarTodosCursos(int IdGrado){
        
        return HorarioDao.getInstance().ListarTodosCursos(IdGrado);    
    
    }
    
    public List<GradoBE> ListarGradoByTipoNivel(int IdTipoNivel){
    
        return HorarioDao.getInstance().ListarGradoByTipoNivel(IdTipoNivel);
    }
    
     public Boolean InsertarMalla(MallaBE malla){
     
         HorarioDao.getInstance().InsertarMalla(malla);
         malla.setId(GetLastMalla());
         return HorarioDao.getInstance().UpdateSucesivo(malla);
         
     }
     
     public Boolean CursoUpdateMalla(CursoBE curso){
         
         return HorarioDao.getInstance().CursoUpdateMalla(curso);
         
     }
     public int GetLastMalla(){
         
         return HorarioDao.getInstance().GetLastMalla();
     
     }
    
}
